﻿@model CommentViewModel
<article id="comment-id-@Model.Item.CommentId" class="comment">
    <div class="comment-image">
        @if (!string.IsNullOrWhiteSpace(Model.PhotoUrl))
        { 
            <img src="@Model.PhotoUrl" alt="User Image" width="64" height="64" />
        }
        else
        { 
            <img src="@Url.Content("/Content/Images/user.gif")" alt="User Image" width="64" height="64" />
        }
    </div>
    <div class="comment-info">
        <div class="comment-name">
            <h4>@Model.Author</h4>
        </div>
        <div class="comment-time">
            @TimeZoneInfo.ConvertTimeFromUtc(Model.Item.Created, Request.GetClientTimeZone())
        </div>
    </div>
    <div class="comment-text">
        @Html.Raw(Model.Item.Text)
    </div>
</article>
